﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
	x:Class="myBoard.App.AuthenticationControl"
	x:Name="UserControl"
	HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="Calibri" RenderTransformOrigin="0.5,0.5">

	<UserControl.Resources>
		<Style x:Key="PasswordBoxStyle2" TargetType="{x:Type PasswordBox}">
			<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
			<Setter Property="FontFamily" Value="Times New Roman"/>
			<Setter Property="PasswordChar" Value="●"/>
			<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
			<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="HorizontalContentAlignment" Value="Left"/>
			<Setter Property="Padding" Value="1"/>
			<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
			<Setter Property="AllowDrop" Value="true"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type PasswordBox}">
						<Border Width="Auto" Height="Auto" BorderBrush="#FF454545" BorderThickness="1" CornerRadius="4,4,4,4" d:LayoutOverrides="Width">
							<Border.Background>
								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="Gainsboro" Offset="0"/>
									<GradientStop Color="Gainsboro" Offset="1"/>
									<GradientStop Color="#FFF0F0F0" Offset="0.282"/>
								</LinearGradientBrush>
							</Border.Background>
							<ScrollViewer SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" x:Name="PART_ContentHost" Margin="7,0" VerticalAlignment="Center"/>
						</Border>
						<ControlTemplate.Triggers>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Storyboard x:Key="HideSB">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="-140" KeySpline="0,1,1,1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="ShowSB">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" KeySpline="0,1,1,1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" KeySpline="0,1,1,1"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>
	<UserControl.RenderTransform>
		<TransformGroup>
			<ScaleTransform/>
			<SkewTransform/>
			<RotateTransform/>
			<TranslateTransform/>
		</TransformGroup>
	</UserControl.RenderTransform>

	<Grid x:Name="LayoutRoot" Width="400" Height="Auto">
		<Grid HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Top" Width="Auto" Height="220" ClipToBounds="True">
			<Grid.RowDefinitions>
				<RowDefinition Height="0.109*"/>
				<RowDefinition Height="0.891*"/>
			</Grid.RowDefinitions>
			<Border Margin="0" Width="Auto" Height="Auto" BorderBrush="#FF9B9B9B" BorderThickness="1" CornerRadius="0,0,7,7" Grid.Row="1" d:LayoutOverrides="Height">
				<Border.Background>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFF0F0F0" Offset="1"/>
						<GradientStop Color="#FEFEFEFE"/>
					</LinearGradientBrush>
				</Border.Background>
				<StackPanel Margin="145,64,25,0" VerticalAlignment="Top">
					<Grid Height="23">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="0.259*"/>
							<ColumnDefinition Width="0.741*"/>
						</Grid.ColumnDefinitions>
						<TextBlock VerticalAlignment="Center" Text="Login" TextWrapping="Wrap" Margin="0,0,10,0" d:LayoutOverrides="Width" HorizontalAlignment="Right"/>
						<TextBox Background="{x:Null}" BorderBrush="{x:Null}" FontFamily="Calibri" FontSize="10" Foreground="#FF737373" x:Name="_userNameTbx" Style="{DynamicResource StoreTextboxStyle1}" TextWrapping="Wrap" FontStyle="Italic" Margin="0" Grid.Column="1"/>
					</Grid>
					<Grid Margin="0,10,0,0" Height="23">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="0.263*"/>
							<ColumnDefinition Width="0.737*"/>
						</Grid.ColumnDefinitions>
						<TextBlock VerticalAlignment="Center" Text="Password" TextWrapping="Wrap" d:LayoutOverrides="Width" Margin="0,0,10,0" HorizontalAlignment="Right"/>
						<PasswordBox x:Name="_userPasswordTbx" Style="{DynamicResource PasswordBoxStyle}" Grid.Column="1"/>
					</Grid>
					<StackPanel HorizontalAlignment="Right" Margin="0,10,0,0">
						<Button x:Name="_signInBt" Style="{DynamicResource StoreButtonStyle1}" Height="24" Content="Sign In" Foreground="White" Width="80" FontFamily="Century Gothic" Cursor="Hand" HorizontalAlignment="Right">
							<Button.Background>
								<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
									<GradientStop Color="#FFF3F3F3" Offset="0"/>
									<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
									<GradientStop Color="#FFDDDDDD" Offset="0.5"/>
									<GradientStop Color="White" Offset="1"/>
								</LinearGradientBrush>
							</Button.Background>
						</Button>
					</StackPanel>
				</StackPanel>
			</Border>
			<Button x:Name="_registerBt" Cursor="Hand" HorizontalAlignment="Right" Margin="0,15,-33,0" Style="{DynamicResource TransparentButtonStyle}" VerticalAlignment="Top" BorderBrush="{x:Null}" RenderTransformOrigin="0.5,0.5" Grid.Row="1">
				<Button.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="45"/>
						<TranslateTransform/>
					</TransformGroup>
				</Button.RenderTransform>
				<Border Margin="0" VerticalAlignment="Top" Height="25" RenderTransformOrigin="0.5,0.5" BorderBrush="#FF0484AB" BorderThickness="1" Width="120">
					<Border.Background>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FF90DCF4" Offset="0"/>
							<GradientStop Color="#FF90DCF4" Offset="1"/>
							<GradientStop Color="#FF07B2E6" Offset="0.603"/>
							<GradientStop Color="#FF41C2EC" Offset="0.849"/>
						</LinearGradientBrush>
					</Border.Background>
					<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="Aharoni" FontSize="14.667" Foreground="#FFEBFAFF" Text="REGISTER" TextWrapping="Wrap"/>
				</Border>
			</Button>
			<Border Margin="0">
				<Border.Background>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FF424242" Offset="0"/>
						<GradientStop Color="Black" Offset="1"/>
					</LinearGradientBrush>
				</Border.Background>
				<StackPanel Margin="5,0,0,0" VerticalAlignment="Center" Orientation="Horizontal">
					<TextBlock Foreground="#FFF2F2F2" Text="Authentification" TextWrapping="Wrap"/>
					<Rectangle Margin="5,0,0,0" Width="1">
						<Rectangle.Fill>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="#0007B2E6" Offset="0"/>
								<GradientStop Color="#0007B2E6" Offset="1"/>
								<GradientStop Color="#FF90DCF4" Offset="0.5"/>
							</LinearGradientBrush>
						</Rectangle.Fill>
					</Rectangle>
					<TextBlock Foreground="#FF90DCF4" Text="Security manager" TextWrapping="Wrap" Margin="5,0,0,0"/>
				</StackPanel>
			</Border>
			<Image HorizontalAlignment="Left" Margin="8,13,0,1" Width="128" Grid.Row="1" Source="/myBoard.App;Component/Images/lock.png" VerticalAlignment="Center"/>
			<CheckBox Content="Remember me" Margin="27,0,0,10" VerticalAlignment="Bottom" FontFamily="Calibri" HorizontalAlignment="Left" Style="{DynamicResource InvertedCheckbox}" Grid.Row="1" Visibility="Collapsed"/>
			<Label x:Name="_authentificationFailedText" HorizontalAlignment="Right" Margin="0,40.01,73,0" VerticalAlignment="Top" Width="125" Height="21.01" Content="Authentification failed." Grid.Row="1" Foreground="Red" Visibility="Hidden"/>
		</Grid>
	</Grid>
</UserControl>